/**
 * 	write on 2005-11-15 12:21:37.
 */
package org.nanhill.xmlro.gsp.model;

import static org.nanhill.xmlro.gsp.GspConstants.ARRAY;
import static org.nanhill.xmlro.gsp.GspConstants.BASE64;
import static org.nanhill.xmlro.gsp.GspConstants.BOOLEAN;
import static org.nanhill.xmlro.gsp.GspConstants.DOUBLE;
import static org.nanhill.xmlro.gsp.GspConstants.INT;
import static org.nanhill.xmlro.gsp.GspConstants.NULL;
import static org.nanhill.xmlro.gsp.GspConstants.STRING;
import static org.nanhill.xmlro.gsp.GspConstants.STRUCT;
import static org.nanhill.xmlro.gsp.GspConstants.UINT;

import org.nanhill.xmlro.AbstractDeserializerFactory;
import org.nanhill.xmlro.sro.model.SroBase64Deserializer;
import org.nanhill.xmlro.sro.model.SroBooleanDeserializer;
import org.nanhill.xmlro.sro.model.SroCollectionDeserializer;
import org.nanhill.xmlro.sro.model.SroDoubleDeserializer;
import org.nanhill.xmlro.sro.model.SroIntegerDeserializer;
import org.nanhill.xmlro.sro.model.SroLongDeserializer;
import org.nanhill.xmlro.sro.model.SroNullDeserializer;
import org.nanhill.xmlro.sro.model.SroStringDeserializer;

/**
 * @author alin
 * 
 */
public class GspDeserializerFactory extends AbstractDeserializerFactory {

	public GspDeserializerFactory() {
		init();
	}

	private void init() {
		dispatcher.put(NULL, new SroNullDeserializer());
		dispatcher.put(ARRAY, new SroCollectionDeserializer());
		dispatcher.put(STRUCT, new GspMapDeserializer());
		dispatcher.put(STRING, new SroStringDeserializer());
		dispatcher.put(INT, new SroIntegerDeserializer());
		dispatcher.put(UINT, new SroLongDeserializer());
		dispatcher.put(BOOLEAN, new SroBooleanDeserializer());
		dispatcher.put(DOUBLE, new SroDoubleDeserializer());
		dispatcher.put(BASE64, new SroBase64Deserializer());
	}

}
